<extend name="Base/common"/>
<block name="style">
    <link href="__CSS__/store.css" type="text/css" rel="stylesheet">
</block>
<block name="header">
    <include file="Public/nav"/>
</block>
<block name="body">
    <div class="container">
        <div>
            <div class="pull-left" style="margin-right: 0;padding-right: 0;width: 145px;">
                <!--所有分类 Start-->
                <include file="Public/_menu_tree"/>
            </div>
            <div class="pull-left" style="padding:0 5px;margin-left: 0;width: 755px;min-height: 1px;">
                <include file="Public/_adv"/>
            </div>
            <div class="pull-left" style="width: 240px">
                <div class="common_block_border" style="margin-bottom: 0;border-bottom: none;">
                    <h2 class="common_block_title" style="margin-top: 0px;">商城统计</h2>

                    <div class="bgwhite clearfix text-center" style="margin-top: 12px;">
                        <div class="col-xs-6">
                            <span class="f16px">商品总数</span><br/>
                            <b>
                                <php>
                                    echo D('Info')->where('status=1')->count();
                                </php>
                            </b>

                            <div style="padding: 12px"></div>
                        </div>
                        <div class="col-xs-6">
                            <span class="f16px">累计交易额</span><br/>
                            ￥ <b>{$total_money}</b>
                        </div>

                    </div>
                </div>

                <div class="common_block_border" style="margin-top: 10px;">
                    <h2 class="common_block_title">
                        快速入口
                    </h2>

                    <div class="bgwhite clearfix text-center">
                        <div class="col-xs-6">
                            <a href="{:U('store/center/createshop',array('name'=>'shop'))}">
                                <img src="__IMG__/start.png"><br/>
                                店铺入驻</a>

                            <div style="padding: 10px"></div>
                        </div>
                        <div class="col-xs-6">
                            <a href="{:U('store/Center/orders')}">
                                <img src="__IMG__/my.png"><br/>
                                我的订单</a>

                        </div>

                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>
            <div class="row">

            </div>
        </div>
        <div class="row">
            <div class="col-xs-12">
                <div class="common_block_border">
                    <div class="common_block_title">
                        最新上架
                    </div>
                    {:W('InfoList/render',array(array('name'=>'good','order'=>'create_time desc','type'=>'limit','num'=>'12')))}
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-12">
                <div class="common_block_border">
                    <div class="common_block_title">
                        热门店铺
                    </div>
                    <div class="pd10">
                        <volist name="hotShop" id="vo">
                            <div class="clearfix">
                                <div class="col-xs-3 c_s_ul_logo   pd10 mr10" style=" ">
                                    <a class="f16px"
                                       href="{:U('store/shop/detail',array('id'=>$vo['id']))}">
                                        <img class="img-rounded" src="{:getThumbImageById($vo['logo'],80,80)}">
                                    </a>

                                    <div class="left" style="width: 140px">
                                        <p class="mb10">
                                            <a class="f16px"
                                               href="{:U('store/shop/detail',array('id'=>$vo['id']))}">{$vo.title}</a>
                                        </p>

                                        <p class="mb10">掌柜： <a href="{$vo.user.space_url}" event-node="face_card"
                                                               uid="{$vo.user.uid}" class="text-more" style="width: 50%"><img
                                                class="mr5 p16 avatar-img"
                                                src="{$vo.user.avatar32}"> {$vo.user.nickname}</a></p>

                                        <p class="mb5">所在地：{$vo.position}</p>

                                        <p class="mb5">
                                            创店于：{$vo.create_time|date='Y.m.d',###}
                                        </p>

                                        <p>共{:count($vo['goods'])}件商品</p>
                                    </div>
                                    <div class="clearfix"></div>
                                </div>

                                <div class="col-xs-9  pd10 " style="  height:102px;*height:106px;">
                                    <if condition="count($vo['goods'])==0"><span
                                            style="font-size: 32px;line-height: 102px;padding-left: 20px">小店新开张，还没有上传任何商品。</span>
                                    </if>
                                    <ul class="c_s_ul_goods">
                                        <volist name="vo['goods']" id="gd">
                                            <li style="position: relative;<php>if($i % 6 == 0) echo 'margin-right:0';</php>;margin-bottom: 10px">
                                                <a target="_blank" href="{:U('store/Index/info',array('info_id'=>$gd['id']))}">
                                                    <img src="{$gd.cover_id|getThumbImageById=100,100}"
                                                         style="width: 100px;height: 100px;">

                                                    <div class="c_tt">
                                                        ￥{$gd.price|number_format=2}
                                                    </div>
                                                </a>

                                            </li>
                                        </volist>
                                    </ul>
                                </div>
                                <div class="clearfix"></div>
                            </div>
                            <hr/>
                        </volist>
                    </div>

                </div>
            </div>
        </div>
    </div>
</block>